package club.baimahu.pencil.domain.entity.event;

import club.baimahu.pencil.domain.session.Replenishment;

public class StockShortOfEvent implements  StockEvent{

    Replenishment replenishment;

    // 事件触发时间
    private long timestamp;

    public StockShortOfEvent(Replenishment replenishment){
        this.replenishment = replenishment;
        this.timestamp = System.currentTimeMillis();
    }

    @Override
    public Object source() {
        return replenishment;
    }

    @Override
    public String eventName() {
        return "库存短缺";
    }

    @Override
    public long triggerTime() {
        return this.timestamp;
    }
}
